<template>
  <div>
    <admin-form></admin-form>
    <admin-table :count="count" :adminList="adminList"></admin-table>
  </div>
</template>
<script>
import adminForm from './adminForm.vue'
import adminTable from './adminTable.vue'
import { _getAdminList } from '../../api/admin'
export default {
  components: { adminForm, adminTable },
  data () {
    return {
      searchText: '',
      pageStart: 1,
      adminList: [],
      diaFlag: false,
      count: 0
    }
  },
  created () {
    this.getAdmin()
  },
  methods: {
    async getAdmin () {
      // 获取管理员列表接口
      var res = await _getAdminList({
        searchText: this.searchText,
        pageStart: this.pageStart
      })
      console.log(res)
      this.adminList = res.data.list
      this.count = res.data.count
    }
  }
}
</script>
<style lang="less"></style>
